//#define __FORCE_TRACE__
//#define __FORCE_DEBUG__
//#define __FORCE_INFO__
#define THIS_FILE "tools\fn_createTrigger.sqf"
#include <tmf_constants.h>
#include <tmf_macros.h>

TRACE_1("Start",_this);
TMFPROFILERSTART;

private ["_pos", "_trigarea", "_trigact", "_trigstatem", "_trigger","_trigtext"];
DEFAULT_PARAM(_pos,0,[]);
DEFAULT_PARAM(_trigarea,1,[]);
DEFAULT_PARAM(_trigact,2,[]);
DEFAULT_PARAM(_trigstatem,3,[]);
DEFAULT_PARAM(_trigtext,4,"");

_trigger = createTrigger ["EmptyDetector" ,_pos];
_trigger setTriggerArea _trigarea;
_trigger setTriggerActivation _trigact;
_trigger setTriggerStatements _trigstatem;
If (_trigtext != "") then { _trigger setTriggerText _trigtext; };

TRACE("End");
TMFPROFILERSTOP;
_trigger